package com.ysd.lis.controller.qi;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.qi.QiMajorBusiness;
import com.ysd.lis.service.qi.QiMajorBusinessService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 质量指标-专业对照表 前端控制器
 * </p>
 *
 * @author wh
 * @since 2025-03-04
 */
@RestController
@RequestMapping("/api/qi/majorBusiness")
public class QiMajorBusinessController extends BaseController {

    @Autowired
    private QiMajorBusinessService qiMajorBusinessService;

    @ApiOperation("查询")
    @GetMapping("/findQiMajorBusinessList")
    public Result findQiMajorBusinessList(QiMajorBusiness qiMajorBusiness) {
        return qiMajorBusinessService.findQiMajorBusinessList(qiMajorBusiness);
    }

    @ApiOperation("添加对照关系")
    @PostMapping("/addQiMajorBusiness")
    public Result addQiMajorBusiness(@RequestBody QiMajorBusiness qiMajorBusiness) {
        return qiMajorBusinessService.addQiMajorBusiness(qiMajorBusiness);
    }

    @ApiOperation("删除对照关系")
    @PostMapping("/deleteQiMajorBusiness")
    public Result deleteQiMajorBusiness(@RequestBody QiMajorBusiness qiMajorBusiness) {
        return qiMajorBusinessService.deleteQiMajorBusiness(qiMajorBusiness);
    }
}
